package com.tencreat.mapper.mall;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tencreat.domain.mall.MallAftersale;
import com.tencreat.domain.mall.dto.MallAdminAfterSaleDTO;
import com.tencreat.domain.mall.vo.MallAdminAftersaleVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 售后Mapper接口
 *
 * @author tencreat
 * @date 2021-08-13
 */
public interface MallAftersaleMapper extends BaseMapper<MallAftersale> {

    IPage<MallAdminAftersaleVO> pages(IPage<?> page, @Param("param") MallAdminAfterSaleDTO dto);

    /**
     *
     * @param type 1|待审核 2|退货中 3|已完成 4|已拒绝
     * @param day 当天日期
     * @return
     */
    BigDecimal refundCount(@Param("type") Integer type, @Param("day")LocalDateTime day);
}
